let obj = { value: 'A' }
let expr = "value === 'A'";
//动态创建一个函数，让函数执行的时候传递正确 this
let evaluate = new Function(`
   with(this){
      return `+ expr + `
   }
`);
let evaluate2 = function(){
    with (this) {
        return value === 'A';
    }
}
let result = evaluate.call(obj);
console.log(result)
let result2 = evaluate2.call(obj);
console.log(result2)

